<template>
	<view class="all">
		<view class="" v-for="i,listIndex in list" :key="listIndex">

			<view class="top-content">
				<view class="content-item">
					<view class="title">
						<text class="point"></text>
						<text class="item-title">会议主题</text>
					</view>
					<text class="item-ipt">{{i.theme}}</text>
				</view>
				<view class="content-item">
					<view class="title">
						<text class="point"></text>
						<text class="item-title">时间</text>
					</view>
					<text class="item-ipt">{{i.meeting_time}}</text>
				</view>
				<view class="content-item">
					<view class="title">
						<text class="point"></text>
						<text class="item-title">地点</text>
					</view>
					<text class="item-ipt">{{i.place}}</text>
				</view>
				<view class="content-item">
					<view class="title">
						<text class="point"></text>
						<text class="item-title">主持人</text>
					</view>
					<text class="item-ipt">{{i.host}}</text>
				</view>
				<view class="content-item">
					<view class="title">
						<text class="point"></text>
						<text class="item-title">记录人</text>
					</view>
					<text class="item-ipt">{{i.note_taker}}</text>
				</view>
				<view class="content-item">
					<view class="title">
						<text class="point"></text>
						<text class="item-title">主要内容</text>
					</view>
					<text class="item-ipt">{{i.content}}</text>
				</view>
				<view class="content-item">
					<view class="title">
						<text class="point"></text>
						<text class="item-title">应到人数</text>
					</view>
					<text class="item-ipt">{{i.should_num}}</text>
				</view>
				<view class="content-item">
					<view class="title">
						<text class="point"></text>
						<text class="item-title">实到人数</text>
					</view>
					<text class="item-ipt">{{i.actual_num}}</text>
				</view>
			</view>
			<view class="white" v-if="i.sign_in_file.length>0">
				<view class="title">
					<text class="point"></text>
					<text class="item-title">会议签到表</text>
				</view>
				<view class="doc">
					<image class="docfile" :key="index" v-for="v,index in i.sign_in_file" @tap="downFile(v)" src="../../static/programme1.png" mode=""></image>
				</view>
			</view>
			<view class="white" v-if="i.meeting_file.length>0">
				<view class="title">
					<text class="point"></text>
					<text class="item-title">会议纪要</text>
				</view>
				<view class="doc">
					<image class="docfile" :key="index" v-for="v,index in i.meeting_file" @tap="downFile(v)" src="../../static/word.png" mode=""></image>
				</view>
			</view>
			<view class="white" v-if="i.image.length>0">
				<view class="title">
					<text class="point"></text>
					<text class="item-title">会议照片</text>
				</view>
				<view class="doc">
					<image class="docimg" :key="ind" v-for="v,ind in i.image" @tap="previewImage(i.image,ind)" :src="v" mode=""></image>
				</view>
			</view>
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: []
			}
		},
		onLoad(e) {
			this.init(e.id)
		},
		methods: {
			init(id) {
				let _this = this
				uni.request({
					url: this.$url + 'relevant.meeting/getMeetingInfoById',
					method: 'GET',
					header: {
						token: uni.getStorageSync('token')
					},
					data: {
						id: id
					},
					success: (res) => {
						if (res.data.code == 1) {
							_this.list = [res.data.data]
						}
					}
				})
			},
			downFile(url){
				this.$downFile(url)
			},
			previewImage(img,index){
				this.$previewImage(img,index)
			}
			
		}
	}
</script>

<style lang="less" scoped>
	.white{
		background: #FFFFFF;
		display: flex;
		align-items: center;
		padding: 0rpx 32rpx;
	}
	.title {
		width: 150rpx;
		display: flex;
		align-items: center;
		margin-right: 80rpx;
	
		.point {
			width: 8rpx;
			height: 8rpx;
			background: #003690;
			border-radius: 50%;
			margin-right: 14rpx;
		}
	
		.item-title {
			font-size: 28rpx;
			font-family: Source Han Sans SC;
			font-weight: 400;
			color: #333333;
			white-space: nowrap;
		}
	}
	.all {
		background: #F1F1F1;
		min-height: 100vh;

		.top-content {
			.content-item {
				display: flex;
				background: #FFFFFF;
				justify-content: space-between;
				border-bottom: 1px solid #DDDDDD;
				padding: 0rpx 32rpx;
				height: 100rpx;
				align-items: center;

				.title {
					width: 150rpx;
					display: flex;
					align-items: center;
					margin-right: 80rpx;

					.point {
						width: 8rpx;
						height: 8rpx;
						background: #003690;
						border-radius: 50%;
						margin-right: 14rpx;
					}

					.item-title {
						font-size: 28rpx;
						font-family: Source Han Sans SC;
						font-weight: 400;
						color: #333333;
					}
				}


				.item-ipt {
					flex: 1;
					font-size: 24rpx;
					font-family: Source Han Sans SC;
					font-weight: 400;
					color: #555555;
				}
			}
		}

		.doc {
			height: 100rpx;
			display: flex;
			align-items: center;
			background: #FFFFFF;
			.docfile{
				width: 48rpx;
				height: 60rpx;
				margin-right: 20rpx;
			}

			.docimg {
				width: 60rpx;
				height: 60rpx;
				margin-right: 20rpx;
			}
		}
	}
</style>
